<!DOCTYPE html>
<html>
    
    <head>
        <meta charset="utf-8">
        <title>
            后台管理系统
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="/static/css/x-admin.css" media="all">
    </head>

    <body>
        <div class="x-body">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label for="username" class="layui-form-label">
                        <span class="x-red">*</span>登录名
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="username" name="username" required="" lay-verify="required"
                               value="{$aa.name}"
                        autocomplete="off" class="layui-input">
                        <input type="text" style="display: none" name="id" required="" lay-verify="required"
                               value="{$aa.id}"
                               autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        <span class="x-red">*</span>将会成为您唯一的登入名
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="phone" class="layui-form-label">
                        <span class="x-red">*</span>手机
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="phone" name="phone" required="" lay-verify="phone"
                               value="{$aa.phone}"
                        autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">
                        <span class="x-red">*</span>将会成为您唯一的登入名
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        <span class="x-red">*</span>公司
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="company" name="company" required=""
                               value="{$aa.company}"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="phone" class="layui-form-label">
                        <span class="x-red">*</span>信用代码
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" id="credit" name="credit" required=""
                               value="{$aa.credit}"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label for="L_repass" class="layui-form-label">
                    </label>
                    <input type="button" class="layui-btn" lay-filter="add" lay-submit="" value="修改" />
                </div>
            </form>
        </div>
        <script src="/static/lib/layui/layui.js" charset="utf-8">
        </script>
        <script src="/static/js/x-layui.js" charset="utf-8">
        </script>
        <script>
            layui.use(['element','layer','form'], function(){
                $ = layui.jquery;//jquery
                lement = layui.element();//面包导航
                layer = layui.layer;//弹出层
                form = layui.form();

              //监听提交
                form.on('submit(add)', function(data){
                    var date = data.field;
                    $.ajax({
                        url:"{:url('admintGai')}",
                        type:"post",
                        dataType:"json",
                        data:{data:date},
                        success:function (res) {
                            if (res.status == 1){
                                layer.msg(res.infoss, {icon: 6,time:2000},function () {
                                    window.parent.location.reload();
                                    var index = parent.layer.getFrameIndex(window.name);
                                    parent.layer.close(index);
                                });
                                return false;
                            }else{
                                layer.msg(res.infoss, {icon: 7,time:2000});
                                return false;
                            }
                        }
                    })
                });


            });
        </script>

    </body>

</html>